﻿using System;
using System.Collections.Generic;
using System.Text;
using PB.Airsoft.Core;
using PB.Airsoft.Core.Unity;

namespace PB.Airsoft.Business.Utilities.Caching
{
    public abstract class CacheManager
    {
        public static CacheManager Current
        {
            get { return IoC.GetInstance<CacheManager>(); }
        }

        public abstract void AddToCache(string key, string category, object data, int minutesToCache);
        
        public abstract void AddToCache(string key, string category, object data);
        
        public abstract void ClearCache();
        
        public abstract void ClearCache(string category);
        
        public abstract T FromCache<T>(string key, string category, int minutesToCache, Func<T> actionFunction);
        
        public abstract object GetFromCache(string key, string category);
        
        public abstract void RemoveFromCache(string key, string category);
    }
}
